package logic

import (
	"core/card"
	"math/rand"
)

type CardsManager struct {
	cards []string
}

func NewCardManager() *CardsManager {
	cManager := &CardsManager{
		cards: card.CardsMgrGetMe().GetCards(),
	}
	cManager.shuffleCards()
	return cManager
}

func (cm *CardsManager) shuffleCards() []string {
	rand.Shuffle(len(cm.cards), func(i, j int) {
		cm.cards[i], cm.cards[j] = cm.cards[j], cm.cards[i]
	})
	return cm.cards
}
